//
//  AISMediaGroupingTypeTableViewController.h
//  UpnpPlaylist
//
//  Created by Ares on 12/7/15.
//  Copyright © 2015 Ares. All rights reserved.
//

#import <UIKit/UIKit.h>
#import <MediaPlayer/MediaPlayer.h>

@protocol AISMediaPickerViewControllerDelegate;

typedef enum : NSUInteger {
    MIT_GROUPING_TYPE,

    MIT_ARTIST_COLLECTIONS,
    MIT_ALBUM_COLLECTIONS,
    MIT_SONGS_COLLECTIONS,
    MIT_GENRE_COLLECTIONS,
    MIT_PLAYLIST_COLLECTIONS,

    MIT_SONG_ITEMS,
} MediaItemType;


@interface AISMediaPickerViewController : UITableViewController

/**
 * For Create Media Picker with Storyboard UI.
 */
+ (AISMediaPickerViewController *)viewControllerWithAISMediaPicker;

@property(nonatomic, weak) id<AISMediaPickerViewControllerDelegate> delegate;
@property(nonatomic, assign) MediaItemType itemType;
@property(nonatomic, retain) NSString *predicateValue;
@property(nonatomic, retain) MPMediaItemCollection *mediaItemCollection;
@property(nonatomic, assign) BOOL hiddenCancelButton;
@property(nonatomic, weak) IBOutlet UIButton *btnDone;

- (IBAction)btnDoneTapped:(id)sender;

@end


@protocol AISMediaPickerViewControllerDelegate<NSObject>

@required
// It is the delegate's responsibility to dismiss the modal view controller on the parent view controller.
- (void)aisMediaPicker:(AISMediaPickerViewController *)mediaPicker didPickMediaItems:(MPMediaItemCollection *)mediaItemCollection andSelectedIndex:(NSInteger)index;
- (void)aisMediaTableViewControllerDidCancel;

@end
